Get AI Model by ID
Used to retrieve detailed information about a specific AI model. This allows you to view complete configuration, credentials, capabilities, and status of an individual model.
API Endpoint
| Property | Value |
|---|---|
| Request Method | GET |
| Request URL | https://api.seliseblocks.com/models/{model_id} |
Request
Request Example
curl -X GET 'https://api.seliseblocks.com/models/{model_id}?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | The unique identifier of the model. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| project_key | string | No | Project key used to change context. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
note
Model Retrieval Details
- Returns complete model configuration including all settings
- API keys and sensitive credentials are masked for security
- Includes current validation status and active state
- Shows provider-specific configuration (Azure, OpenAI, etc.)
- Access is controlled by project permissions
tip
Use cases for retrieving model details:
- Viewing complete model configuration for documentation
- Auditing model settings and credentials
- Checking model capabilities and limitations
- Verifying provider-specific configurations
- Reviewing validation status and troubleshooting issues
- Confirming streaming support availability
- Checking custom parameters and headers
The response helps you:
- Understand model capabilities and constraints
- Verify API configuration is correct
- Identify credential or validation issues
- Review custom parameters and headers
- Check organization and project associations
- Monitor model status and activity
Response
Success Response (200 OK)
Returns the complete model object with all configuration details.
{
"_id": "model_123",
"CreatedDate": "2025-12-01T10:30:00Z",
"LastUpdatedDate": "2026-01-10T14:20:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_789",
"OrganizationIds": ["org_001"],
"Tags": ["production", "gpt-4", "primary"],
"Provider": "openai",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "GPT-4 Turbo model for production use with streaming support",
"Capabilities": {
"max_tokens": 8192,
"supports_functions": true,
"supports_vision": false,
"supports_json_mode": true,
"context_window": 128000
},
"DisplayName": "GPT-4 Turbo Production",
"ModelName": "gpt-4-turbo-preview",
"ApiKey": "***masked***",
"BaseUrl": "https://api.openai.com/v1",
"OpenAiOrganizationId": "org-123456",
"OpenAiProjectId": "proj-789012",
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {
"temperature": 0.7,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"CustomHeaders": {
"X-Custom-Header": "value"
},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
| _id | string | Unique identifier of the model. |
| CreatedDate | string | ISO 8601 timestamp when the model was created. |
| LastUpdatedDate | string | ISO 8601 timestamp when the model was last updated. |
| CreatedBy | string | User ID who created the model. |
| Language | string | Language code for the model. |
| LastUpdatedBy | string | User ID who last updated the model. |
| OrganizationIds | array | Array of organization IDs the model belongs to. |
| Tags | array | Array of tags for categorization and filtering. |
| Provider | string | AI provider name (openai, anthropic, azure, etc.). |
| ModelType | string | Type of model (chat, embedding, completion). |
| ServicePlatform | string | Service platform type (official_api, azure, custom). |
| ProjectKey | string | Project key the model belongs to. |
| Description | string | Detailed description of the model's purpose and use. |
| Capabilities | object | Model capabilities, features, and limitations. |
| DisplayName | string | Human-readable display name. |
| ModelName | string | Technical model name used in API calls. |
| ApiKey | string | API key for authentication (masked in responses). |
| BaseUrl | string | Base URL for API requests to the provider. |
| OpenAiOrganizationId | string | OpenAI organization ID (OpenAI models only). |
| OpenAiProjectId | string | OpenAI project ID (OpenAI models only). |
| ApiVersion | string | API version (required for Azure OpenAI). |
| DeploymentName | string | Deployment name (required for Azure OpenAI). |
| CustomParameters | object | Additional custom parameters for the model. |
| CustomHeaders | object | Custom HTTP headers for API requests. |
| Status | string | Validation status: "valid" or "invalid". |
| IsActive | boolean | Whether the model is currently active and usable. |
| HasStreaming | boolean | Whether the model supports streaming responses. |
Capabilities Object
Common capability fields include:
| Field | Type | Description |
|---|---|---|
| max_tokens | integer | Maximum number of tokens the model can generate. |
| supports_functions | boolean | Whether the model supports function calling. |
| supports_vision | boolean | Whether the model supports image inputs. |
| supports_json_mode | boolean | Whether the model can output structured JSON. |
| context_window | integer | Maximum context window size in tokens. |
Provider-Specific Fields
For OpenAI Models:
OpenAiOrganizationId: Organization identifierOpenAiProjectId: Project identifier
For Azure OpenAI Models:
ApiVersion: Azure API version (e.g., "2023-12-01-preview")DeploymentName: Azure deployment nameBaseUrl: Azure endpoint URL
For Custom Models:
CustomParameters: Provider-specific parametersCustomHeaders: Authentication or custom headers
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"path",
"model_id"
],
"msg": "model not found",
"type": "value_error.notfound"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., path, query). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Status Interpretation
| Status | Meaning | Recommended Action |
|---|---|---|
| valid | Credentials are valid and model is operational | No action needed; model is ready to use |
| invalid | Credentials failed validation or expired | Update API key or reconfigure model settings |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid request | Bad Request |
| 404 | Not Found - Model does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |